using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class MonseterBuilder : IBuilder<Monster>
{
    public int m_monsterID;
    private GameObject monsterGo;

    public void GetDate(Monster productClassGo)
    {
        productClassGo.monsterID = m_monsterID;
        productClassGo.HP = m_monsterID * 150;
        productClassGo.currentHP = productClassGo.HP;
        productClassGo.moveSpeed = 3/ m_monsterID + 1f;
        productClassGo.initMoveSpeed = productClassGo.moveSpeed;
        productClassGo.prize = m_monsterID * 50;
    }

    public void GetOtherResource(Monster productClassGo)
    {
        productClassGo.GetMonsterProperty();
    }

    public GameObject GetProduct()
    {
        GameObject itemGo = GameControl.Instance.GetGameObjectResource("MonsterPrefabs");
        Monster monster = GetProductClass(itemGo);
        GetDate(monster);
        GetOtherResource(monster);
        return itemGo;
    }

    public Monster GetProductClass(GameObject gameObject)
    {
        return gameObject.GetComponent<Monster>();
    }
}
